package kr.hkit.powerjava.homework;

public class java1 {
	private int a;
	private int b;
	private int c;
	
	public java1(int a, int b, int c) {
		this.a = a;
		this.b = b;
		this.c = c;
	}

	public  int getaaaa() {

		System.out.print("자유이용은 1번 입장권은 2번:");
//		 a= AA.nextInt();
		int d = 0;
		switch (a) {
			case 1:
				System.out.print("자유권선택 나이시간 입력");

//				 b= AA.nextInt();//나이
//				 c= AA.nextInt();//시간
				if (b < 3) {
					System.out.println("요금무료 ");
				} else if (b < 13 || b > 64) {

					if (c < 17) {
						d =25000;
						System.out.println("요금 25000 ");
					} else {
						d =21000;
						System.out.println("요금 21000 ");
					}
				} else {
					if (c < 17) {
						d =34000;
						System.out.println("요금 34000 ");
					} else {
						d =29000;
						System.out.println("요금 29000 ");
					}
				}
				break;
			case 2:
				System.out.print("입장권선택");
//				 b= AA.nextInt();//나이
//				 c= AA.nextInt();//시간
				if (b < 3) {
					System.out.println("요금무료 ");
				} else if (b < 13 || b > 64) {
					if (c < 17) {
						d =20000;
						System.out.println("요금 20000 ");
					} else
						d =17000;
						System.out.println("요금 17000 ");
				} else {
					if (c < 17) {
						d =27000;
						System.out.println("요금 27000 ");
					} else
						d =23000;
						System.out.println("요금 23000 ");
				}
				break;

		}
		
		return d;
	}

	@Override
	public String toString() {
		return "java1 [무엇=" + a + ", 나이=" + b + ", 시간=" + c + "]"+getaaaa();
	}

	
}

